<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="com.jfok.server.common.ILoginConstant"%>
<%@page import="org.springframework.web.context.ContextLoader"%>
<%@page import="com.jfok.server.common.TypeChange"%>
<%@page import="com.jfok.server.hibernate.systemset._Systemset"%>
<%@page import="com.jfok.server.hibernate.systemset._Systeminfo"%>
<%@page import="com.jfok.server.login.LoginLogic"%>
<%@page import="com.jfok.server.service.SystemGlobalInfoService"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<html>
<%
	String path = request.getContextPath();
	String indexPath = path + "/" + ILoginConstant.INDEXPATH;
	_Systeminfo systeminfo = SystemGlobalInfoService.getSysteminfo();
	_Systemset systemset = SystemGlobalInfoService.getSystemset();
	ApplicationContext context = SystemGlobalInfoService.getApplicationContext();
	LoginLogic loginLogic = (LoginLogic) context.getBean(LoginLogic.class);
	if (!loginLogic.isNeedUserLogin(request))
		response.sendRedirect(indexPath);
%>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="Shortcut Icon" href="favicon.png" type="image/png" />
<title><%=systeminfo.getTf_systemName()%>登录</title>
<link type="text/css" rel="stylesheet" href="styles/login.css">
<script type="text/javascript" src="js/shared/cookies.js"></script>
<script type="text/javascript" src="js/shared/include-ext.js"></script>
<script type="text/javascript" src="js/shared/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="js/login/login.js"></script>

</head>
<body class='body'>
	<div id="sinfo"
		sinfo='{"systemName":"<%=systeminfo.getTf_systemName()%>",
		"userdwmc":"使用单位：<%=systemset.getTf_userdwmc()%>",
		"startdate":"开始使用时间：<%=TypeChange.DateToString(systemset.getTf_userStartdate())%>",
		"serviceDepartment":"服务单位：<%=systemset.getTf_serviceDepartment()%>",
		"serviceMen":"<%=systemset.getTf_serviceMen()%>",
		"serviceTelnumber":"<%=systemset.getTf_serviceTelnumber()%>",
		"serviceEmail":"<%=systemset.getTf_serviceEmailText()%>",
		"serviceQQ":"<%=systemset.getTf_serviceQQText()%>",
		"copyrightInfo":"<%=systeminfo.getTf_copyrightInfo()%>",
		"autoLoginInTwoWeeks":<%=systeminfo.getTf_allowautoLoginInTwoWeeks().toString()%>,
		"needIdentifingCode":<%=systeminfo.getTf_needIdentifingCode().toString()%>,
		"alwaysNeedIdentifingCode":<%=systeminfo.getTf_alwaysNeedIdentifingCode()%>,
		"isNeedIdentifyingCode":<%=loginLogic.isNeedIdentifyingCode(request)%> }'></div>

	<div id="loading">
		<div class="loading-indicator">
			<img src="images/bg/large-loading.gif" width="32" height="32" />
			<%=systeminfo.getTf_systemName()%>
			<br /> <span id="loading-msg">Loading...</span>
		</div>
	</div>

</body>
</html>